package com.sk.bilibili.event;

import com.sk.bilibili.bean.Danmu;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class LiveEvent {

    // 0  弹幕事件   1 退出   2 More  3 Screen
    private Integer type;
    private Danmu danmu;
    private Boolean fullScreen;

    private LiveEvent(Integer type) {
        this.type = type;
    }

    public static LiveEvent danmuEvent(Danmu danmu){
        return new LiveEvent(0).setDanmu(danmu);
    }

    public static LiveEvent exitEvent(){
        return new LiveEvent(1);
    }

    public static LiveEvent moreEvent(){
        return new LiveEvent(2);
    }

    public static LiveEvent screenEvent(Boolean fullScreen){
        return new LiveEvent(3).setFullScreen(fullScreen);
    }

}